<html>
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta
      name="viewport"
      content="initial-scale=1.0, user-scalable=no, width=device-width"
    />
    <title>HELLO，AMAP!</title>
    <style>
      html,
      body,
      #container {
        width: 100%;
        height: 100%;
      }
    </style>
  </head>
  <body>
    <div id="container"></div>

    <script type="text/javascript">
      window._AMapSecurityConfig = {
        securityJsCode: 'efdb78f27c495fcc65e0f5cbc4cd6928',
      }
    </script>
    <script src="https://webapi.amap.com/loader.js"></script>
    <script type="text/javascript">
      AMapLoader.load({
        key: 'd535bd5b7e610ffb5498ea1bfb63a66a', // 申请好的Web端开发者Key，首次调用 load 时必填
        version: '2.0', // 指定要加载的 JSAPI 的版本，缺省时默认为 1.4.15
      }).then((AMap) => {
        // JS API加载完成后获取AMap对象
        const map = new AMap.Map('container', {
          viewMode: '2D', // 默认使用 2D 模式
          zoom: 11, //初始化地图层级
          center: [116.397428, 39.90923], //初始化地图中心点
        })
      })
    </script>
  </body>
</html>
